#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=2e3+100;
typedef int LL;
typedef tuple<LL,LL,LL> P;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
LL a[maxn];
int main(void){
   	cin.tie(0);std::ios::sync_with_stdio(false);
    LL n;cin>>n;
    for(int i=1;i<=n;i++) cin>>a[i];
    vector<P>v;
    LL mod=n+1;
    LL res=0;
    for(int i=n;i>=1;i--){
        LL tar=i;LL val=a[i]+res;
        LL add=( (tar-val%mod)+mod )%mod;
        res+=add;
        v.push_back(make_tuple(1,i,add));
    }
    v.push_back(make_tuple(2,n,mod));
    cout<<v.size()<<endl;
    for(auto i:v){
        cout<<get<0>(i)<<" "<<get<1>(i)<<" "<<get<2>(i)<<endl;
    }
   	return 0;
}
